export const isFunction = (T: any): boolean => typeof T === 'function'

export const isPromise = (T: any): boolean => !!T && isFunction(T.then)

export const isObject = (value: unknown): value is Record<any, any> => value !== null && typeof value === 'object';
export const isString = (value: unknown): value is string => typeof value === 'string';
export const isBoolean = (value: unknown): value is boolean => typeof value === 'boolean';
export const isNumber = (value: unknown): value is number => typeof value === 'number';